package com.xw.entity;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

/**
 * @Description: Comment
 * @Author: ASUS
 * @Date: 2024/12/19 9:17
 * @Version: 1.0
 */

/**
* 评论表
*/
@Data
public class Comment {
    private Integer id;
    @ApiModelProperty(value = "评论内容")
    @NotBlank(message = "请填写评论内容！")
    private String content;
    @ApiModelProperty(value = "评论人ID")
    private Integer commentUserId;
    @ApiModelProperty(value = "评论人名称")
    private String commentUserName;
    @ApiModelProperty(value = "评论人头像")
    private String commentUserPic;
    @ApiModelProperty(value = "评论时间")
    private Date commentTime;
    @ApiModelProperty(value = "所评论对象的ID")
    @NotNull(message = "所评论对象的ID不能为空!")
    private Integer linkId;
    @ApiModelProperty(value = "帖子ID")
    @NotNull(message = "帖子ID不能为空!")
    private Integer postCodeId;

    private List<Integer> linkIds;

    /**
     * 父级评论人ID
     */
    private Integer userId;
    /**
     * 父级评论人名称
     */
    private String userName;
    /**
     * 父级评论人图片
     */
    private String userPic;

    private List<Comment> children;

}

